﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ComponentModel;
using System.Collections.ObjectModel;


namespace PumpCentral_Domain
{
    public enum Status
    {
        Running,
        Stopped,
        Defect
    }

    public class Pump : INotifyPropertyChanged
    {
        public event PropertyChangedEventHandler PropertyChanged;

        private string id;
        private double waterLevel;
        private Status status;

        public Status Status
        {
            get 
            { 
                return status ;
            }
            set 
            {
                status = value; OnPropertyChanged("Status");
            }
        }
        
        public double WaterLevel
        {
            get
            { 
                return waterLevel;
            } 
            set
            { 
                waterLevel = value; 
                OnPropertyChanged("WaterLevel");
            }
        }
        public string ID 
        {
            get 
            { 
                return id; 
            }
            set 
            {
                id = value;
                OnPropertyChanged("ID");
            }
        }

        public Pump()
        {
 
        }        

        protected void OnPropertyChanged(string name)
        {
            if (PropertyChanged != null)
            {
                PropertyChanged(this, new PropertyChangedEventArgs(name));
            }
        }
    }
}
